package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.entity.bean.DongTaiDetailsBean;
import com.common.retrofit.service.HaiNingService;

import rx.Observable;
import rx.Subscriber;

public class DongTaiDetailMethods extends BaseMethods {

    private static DongTaiDetailMethods m_ins = null;

    public static DongTaiDetailMethods getInstance() {
        if (m_ins == null) {
            synchronized (DongTaiDetailMethods.class) {
                if (m_ins == null) {
                    m_ins = new DongTaiDetailMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "Friend/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void dynamic_detail(Subscriber<DongTaiDetailsBean> subscriber,
                      int  uid,
                      String hashid,String id  ) {
        Observable observable = initService().dynamic_detail(System.currentTimeMillis()+"",
                "3435103f11f21993476fe72ff7a20b8f",uid,hashid,id
        );
        toSubscribe(observable, subscriber);
    }
}
